<?php
if (!defined ('TYPO3_MODE')) 	die ('Access denied.');

$TCA['tx_zboard_topics'] = array (
	'ctrl' => $TCA['tx_zboard_topics']['ctrl'],
	'interface' => array (
		'showRecordFieldList' => 'hidden,subject,message,notify_me,user_id,reply_count,last_post_tstamp,last_post_user_id,hits'
	),
	'feInterface' => $TCA['tx_zboard_topics']['feInterface'],
	'columns' => array (
		'hidden' => array (		
			'exclude' => 1,
			'label'   => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
			'config'  => array (
				'type'    => 'check',
				'default' => '0'
			)
		),
		'subject' => array (		
			'exclude' => 0,		
			'label' => 'LLL:EXT:zboard/locallang_db.xml:tx_zboard_topics.subject',		
			'config' => array (
				'type' => 'input',	
				'size' => '48',	
				'eval' => 'trim',
			)
		),
		'message' => array (		
			'exclude' => 0,		
			'label' => 'LLL:EXT:zboard/locallang_db.xml:tx_zboard_topics.message',		
			'config' => array (
				'type' => 'text',
				'cols' => '48',	
				'rows' => '5',
			)
		),
		'notify_me' => array (		
			'exclude' => 0,		
			'label' => 'LLL:EXT:zboard/locallang_db.xml:tx_zboard_topics.notify_me',		
			'config' => array (
				'type' => 'check',
			)
		),
		'user_id' => array (		
			'exclude' => 0,		
			'label' => 'LLL:EXT:zboard/locallang_db.xml:tx_zboard_topics.user_id',		
			'config' => array (
				'type' => 'group',	
				'internal_type' => 'db',	
				'allowed' => 'fe_users',	
				'size' => 1,	
				'minitems' => 0,
				'maxitems' => 1,
			)
		),
		'reply_count' => array (		
			'exclude' => 0,		
			'label' => 'LLL:EXT:zboard/locallang_db.xml:tx_zboard_topics.reply_count',		
			'config' => array (
				'type' => 'input',	
				'size' => '30',	
				'eval' => 'int',
			)
		),
		'last_post_tstamp' => array (		
			'exclude' => 0,		
			'label' => 'LLL:EXT:zboard/locallang_db.xml:tx_zboard_topics.last_post_tstamp',		
			'config' => array (
				'type'     => 'input',
				'size'     => '12',
				'max'      => '20',
				'eval'     => 'datetime',
				'checkbox' => '0',
				'default'  => '0'
			)
		),
		'last_post_user_id' => array (		
			'exclude' => 0,		
			'label' => 'LLL:EXT:zboard/locallang_db.xml:tx_zboard_topics.last_post_user_id',		
			'config' => array (
				'type' => 'group',	
				'internal_type' => 'db',	
				'allowed' => 'fe_users',	
				'size' => 1,	
				'minitems' => 0,
				'maxitems' => 1,
			)
		),
		'hits' => array (		
			'exclude' => 0,		
			'label' => 'LLL:EXT:zboard/locallang_db.xml:tx_zboard_topics.hits',		
			'config' => array (
				'type' => 'input',	
				'size' => '30',	
				'eval' => 'int',
			)
		),
	),
	'types' => array (
		'0' => array('showitem' => 'hidden;;1;;1-1-1, subject, message, notify_me, user_id, reply_count, last_post_tstamp, last_post_user_id, hits')
	),
	'palettes' => array (
		'1' => array('showitem' => '')
	)
);



$TCA['tx_zboard_replies'] = array (
	'ctrl' => $TCA['tx_zboard_replies']['ctrl'],
	'interface' => array (
		'showRecordFieldList' => 'hidden,topic_id,subject,message,user_id'
	),
	'feInterface' => $TCA['tx_zboard_replies']['feInterface'],
	'columns' => array (
		'hidden' => array (		
			'exclude' => 1,
			'label'   => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
			'config'  => array (
				'type'    => 'check',
				'default' => '0'
			)
		),
		'topic_id' => array (		
			'exclude' => 0,		
			'label' => 'LLL:EXT:zboard/locallang_db.xml:tx_zboard_replies.topic_id',		
			'config' => array (
				'type' => 'select',	
				'foreign_table' => 'tx_zboard_topics',	
				'foreign_table_where' => 'AND tx_zboard_topics.pid=###CURRENT_PID### ORDER BY tx_zboard_topics.uid',	
				'size' => 1,	
				'minitems' => 0,
				'maxitems' => 1,
			)
		),
		'subject' => array (		
			'exclude' => 0,		
			'label' => 'LLL:EXT:zboard/locallang_db.xml:tx_zboard_replies.subject',		
			'config' => array (
				'type' => 'input',	
				'size' => '48',	
				'eval' => 'trim',
			)
		),
		'message' => array (		
			'exclude' => 0,		
			'label' => 'LLL:EXT:zboard/locallang_db.xml:tx_zboard_replies.message',		
			'config' => array (
				'type' => 'text',
				'cols' => '48',	
				'rows' => '5',
			)
		),
		'user_id' => array (		
			'exclude' => 0,		
			'label' => 'LLL:EXT:zboard/locallang_db.xml:tx_zboard_replies.user_id',		
			'config' => array (
				'type' => 'group',	
				'internal_type' => 'db',	
				'allowed' => 'fe_users',	
				'size' => 1,	
				'minitems' => 0,
				'maxitems' => 1,
			)
		),
	),
	'types' => array (
		'0' => array('showitem' => 'hidden;;1;;1-1-1, topic_id, subject, message, user_id')
	),
	'palettes' => array (
		'1' => array('showitem' => '')
	)
);
?>